3.1.72 \(\int (e x)^{-1+n} (a+b \sec (c+d x^n)) \, dx\) [72]

Optimal. Leaf size=44 \[ \frac {a (e x)^n}{e n}+\frac {b x^{-n} (e x)^n \tanh ^{-1}\left (\sin \left (c+d x^n\right )\right )}{d e n} \]

[Out]

a*(e*x)^n/e/n+b*(e*x)^n*arctanh(sin(c+d*x^n))/d/e/n/(x^n)

________________________________________________________________________________________

Rubi [A]
time = 0.03, antiderivative size = 44, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 4, integrand size = 20, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {14, 4293, 4289, 3855} \begin {gather*} \frac {a (e x)^n}{e n}+\frac {b x^{-n} (e x)^n \tanh ^{-1}\left (\sin \left (c+d x^n\right )\right )}{d e n} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(e*x)^(-1 + n)*(a + b*Sec[c + d*x^n]),x]

[Out]

(a*(e*x)^n)/(e*n) + (b*(e*x)^n*ArcTanh[Sin[c + d*x^n]])/(d*e*n*x^n)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3855

Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]

Rule 4289

Int[(x_)^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sec[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IGtQ[Simplify[
(m + 1)/n], 0] && IntegerQ[p]

Rule 4293

Int[((e_)*(x_))^(m_.)*((a_.) + (b_.)*Sec[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[e^IntPart[m]*((e*x
)^FracPart[m]/x^FracPart[m]), Int[x^m*(a + b*Sec[c + d*x^n])^p, x], x] /; FreeQ[{a, b, c, d, e, m, n, p}, x]

Rubi steps

\begin {align*} \int (e x)^{-1+n} \left (a+b \sec \left (c+d x^n\right )\right ) \, dx &=\int \left (a (e x)^{-1+n}+b (e x)^{-1+n} \sec \left (c+d x^n\right )\right ) \, dx\\ &=\frac {a (e x)^n}{e n}+b \int (e x)^{-1+n} \sec \left (c+d x^n\right ) \, dx\\ &=\frac {a (e x)^n}{e n}+\frac {\left (b x^{-n} (e x)^n\right ) \int x^{-1+n} \sec \left (c+d x^n\right ) \, dx}{e}\\ &=\frac {a (e x)^n}{e n}+\frac {\left (b x^{-n} (e x)^n\right ) \text {Subst}\left (\int \sec (c+d x) \, dx,x,x^n\right )}{e n}\\ &=\frac {a (e x)^n}{e n}+\frac {b x^{-n} (e x)^n \tanh ^{-1}\left (\sin \left (c+d x^n\right )\right )}{d e n}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.11, size = 38, normalized size = 0.86 \begin {gather*} \frac {x^{-n} (e x)^n \left (a d x^n+b \tanh ^{-1}\left (\sin \left (c+d x^n\right )\right )\right )}{d e n} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(e*x)^(-1 + n)*(a + b*Sec[c + d*x^n]),x]

[Out]

((e*x)^n*(a*d*x^n + b*ArcTanh[Sin[c + d*x^n]]))/(d*e*n*x^n)

________________________________________________________________________________________

Maple [C] Result contains higher order function than in optimal. Order 9 vs. order 3.
time = 0.94, size = 159, normalized size = 3.61

method result size
risch \(\frac {a x \,{\mathrm e}^{\frac {\left (-1+n \right ) \left (-i \mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right ) \pi +i \mathrm {csgn}\left (i e \right ) \mathrm {csgn}\left (i e x \right )^{2} \pi +i \mathrm {csgn}\left (i x \right ) \mathrm {csgn}\left (i e x \right )^{2} \pi -i \mathrm {csgn}\left (i e x \right )^{3} \pi +2 \ln \left (e \right )+2 \ln \left (x \right )\right )}{2}}}{n}-\frac {2 i \arctan \left ({\mathrm e}^{i \left (c +d \,x^{n}\right )}\right ) e^{n} b \,{\mathrm e}^{\frac {i \pi \,\mathrm {csgn}\left (i e x \right ) \left (-1+n \right ) \left (\mathrm {csgn}\left (i e x \right )-\mathrm {csgn}\left (i x \right )\right ) \left (-\mathrm {csgn}\left (i e x \right )+\mathrm {csgn}\left (i e \right )\right )}{2}}}{d e n}\) \(159\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((e*x)^(-1+n)*(a+b*sec(c+d*x^n)),x,method=_RETURNVERBOSE)

[Out]

a/n*x*exp(1/2*(-1+n)*(-I*csgn(I*e)*csgn(I*x)*csgn(I*e*x)*Pi+I*csgn(I*e)*csgn(I*e*x)^2*Pi+I*csgn(I*x)*csgn(I*e*
x)^2*Pi-I*csgn(I*e*x)^3*Pi+2*ln(e)+2*ln(x)))-2*I*arctan(exp(I*(c+d*x^n)))/d/e*e^n/n*b*exp(1/2*I*Pi*csgn(I*e*x)
*(-1+n)*(csgn(I*e*x)-csgn(I*x))*(-csgn(I*e*x)+csgn(I*e)))

________________________________________________________________________________________

Maxima [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: ValueError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)*(a+b*sec(c+d*x^n)),x, algorithm="maxima")

[Out]

Exception raised: ValueError >> Computation failed since Maxima requested additional constraints; using the 'a
ssume' command before evaluation *may* help (example of legal syntax is 'assume(n-1>0)', see `assume?` for mor
e details)Is

________________________________________________________________________________________

Fricas [A]
time = 3.66, size = 57, normalized size = 1.30 \begin {gather*} \frac {2 \, a d x^{n} e^{\left (n - 1\right )} + b e^{\left (n - 1\right )} \log \left (\sin \left (d x^{n} + c\right ) + 1\right ) - b e^{\left (n - 1\right )} \log \left (-\sin \left (d x^{n} + c\right ) + 1\right )}{2 \, d n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)*(a+b*sec(c+d*x^n)),x, algorithm="fricas")

[Out]

1/2*(2*a*d*x^n*e^(n - 1) + b*e^(n - 1)*log(sin(d*x^n + c) + 1) - b*e^(n - 1)*log(-sin(d*x^n + c) + 1))/(d*n)

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \left (e x\right )^{n - 1} \left (a + b \sec {\left (c + d x^{n} \right )}\right )\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)**(-1+n)*(a+b*sec(c+d*x**n)),x)

[Out]

Integral((e*x)**(n - 1)*(a + b*sec(c + d*x**n)), x)

________________________________________________________________________________________

Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((e*x)^(-1+n)*(a+b*sec(c+d*x^n)),x, algorithm="giac")

[Out]

integrate((b*sec(d*x^n + c) + a)*(e*x)^(n - 1), x)

________________________________________________________________________________________

Mupad [B]
time = 2.66, size = 104, normalized size = 2.36 \begin {gather*} \frac {{\left (e\,x\right )}^n\,\left (b\,\ln \left (-b\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}-2\,b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,{\left (e\,x\right )}^{n-1}\right )-b\,\ln \left (b\,{\left (e\,x\right )}^{n-1}\,2{}\mathrm {i}-2\,b\,{\mathrm {e}}^{c\,1{}\mathrm {i}}\,{\mathrm {e}}^{d\,x^n\,1{}\mathrm {i}}\,{\left (e\,x\right )}^{n-1}\right )+a\,d\,x^n\right )}{d\,e\,n\,x^n} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b/cos(c + d*x^n))*(e*x)^(n - 1),x)

[Out]

((e*x)^n*(b*log(- b*(e*x)^(n - 1)*2i - 2*b*exp(c*1i)*exp(d*x^n*1i)*(e*x)^(n - 1)) - b*log(b*(e*x)^(n - 1)*2i -
 2*b*exp(c*1i)*exp(d*x^n*1i)*(e*x)^(n - 1)) + a*d*x^n))/(d*e*n*x^n)

________________________________________________________________________________________